package com.intech.android.demo.beans;

import com.intech.android.demo.bo.Person;
import com.intech.android.demo.common.Constants;
import com.intech.android.demo.common.LastChosenCategory;
import com.intech.android.demo.dao.FactoryDAO;
import com.intech.android.demo.dao.interfaces.PersonDAO;

import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import java.util.ArrayList;
import java.util.List;

public class ApplicationBean
{
    private boolean maleSwitcher = true;
    private List<SelectItem> ages = new ArrayList<SelectItem>();
    private String currentAge;
    private static final String AGE1 = "15-18";
    private static final String AGE2 = "19-21";
    private static final String AGE3 = "22-27";
    private static final String AGE4 = "28-35";
    private static final String AGE5 = "36-45";
    private static final String AGE6 = "45+";
    private static final String MALE = "male";
    private static final String FEMALE = "female";
    private static final String MALE_OFF_URL = "i/bg/maleOff.png";
    private static final String MALE_ON_URL = "i/bg/maleOn.png";
    private static final String FEMALE_OFF_URL = "i/bg/femaleOff.png";
    private static final String FEMALE_ON_URL = "i/bg/femaleOn.png";
    private String male = MALE_OFF_URL;
    private String female = FEMALE_OFF_URL;
    private String phoneNumber;
    private String password;
    private String repeatPassword;
    private Integer bonuses = 0;
    private Integer adsViewed = 0;
    private String currentStep = Constants.Navigation.LOGIN_LINK;
    private String previousStep;

    private boolean picture1 = true;
    private boolean picture2 = false;
    private boolean picture3 = false;

    private boolean text1 = true;
    private boolean text2 = false;
    private boolean text3 = false;

    private boolean video1 = true;
    private boolean video2 = false;
    private boolean video3 = false;

    private boolean clickedVideo1 = false;
    private boolean clickedVideo2 = false;
    private boolean clickedVideo3 = false;

    private boolean clickedPicture1 = false;
    private boolean clickedPicture2 = false;
    private boolean clickedPicture3 = false;

    private boolean clickedText1 = false;
    private boolean clickedText2 = false;
    private boolean clickedText3 = false;

    private boolean clickedAdOnMap = false;


    private boolean clickedCheckbox1 = false;
    private boolean clickedCheckbox2 = false;
    private boolean clickedCheckbox3 = false;
    private boolean clickedCheckbox4 = false;
    private boolean clickedCheckbox5 = false;
    private boolean clickedCheckbox6 = false;
    private boolean clickedCheckbox7 = false;
    private boolean clickedCheckbox8 = false;
    private boolean clickedCheckbox9 = false;
    private boolean clickedCheckbox10 = false;
    private boolean clickedCheckbox11 = false;
    private boolean clickedCheckbox12 = false;
    private boolean clickedCheckbox13 = false;

    private String firstVideoContent;
    private String secondVideoContent;
    private String thirdVideoContent;

    private String firstVideoLabel;
    private String secondVideoLabel;
    private String thirdVideoLabel;

    private String firstVideoDescription;
    private String secondVideoDescription;
    private String thirdVideoDescription;

    private String firstGraphicLabel;
    private String secondGraphicLabel;
    private String thirdGraphicLabel;

    private String firstGraphicDescription;
    private String secondGraphicDescription;
    private String thirdGraphicDescription;

    private String firstGraphicLink;
    private String secondGraphicLink;
    private String thirdGraphicLink;

    private String firstTextLink;
    private String secondTextLink;
    private String thirdTextLink;

    private String firstGraphicContent;
    private String secondGraphicContent;
    private String thirdGraphicContent;

    private String firstTextContentPart1;
    private String secondTextContentPart1;
    private String thirdTextContentPart1;

    private String firstTextContentPart2;
    private String secondTextContentPart2;
    private String thirdTextContentPart2;

    private LastChosenCategory lastChosenCategory = LastChosenCategory.NONE;

    private Integer counter = 0;

    private String answer;
    private Integer answerNumber = 0;

    public void switchMale(ActionEvent actionEvent)
    {
        String sex = MALE;
    }

    public void switchFemale(ActionEvent actionEvent)
    {
        String sex = FEMALE;
    }


    public void checkAll(ActionEvent actionEvent)
    {
        clickedCheckbox1 = true;
        clickedCheckbox2 = true;
        clickedCheckbox3 = true;
        clickedCheckbox4 = true;
        clickedCheckbox5 = true;
        clickedCheckbox6 = true;
        clickedCheckbox7 = true;
        clickedCheckbox8 = true;
        clickedCheckbox9 = true;
        clickedCheckbox10 = true;
        clickedCheckbox11 = true;
        clickedCheckbox12 = true;
        clickedCheckbox13 = true;
        counter = 13;
    }

    public void uncheckAll(ActionEvent actionEvent)
    {
        clickedCheckbox1 = false;
        clickedCheckbox2 = false;
        clickedCheckbox3 = false;
        clickedCheckbox4 = false;
        lastChosenCategory = LastChosenCategory.NONE;
        clickedCheckbox5 = false;
        clickedCheckbox6 = false;
        clickedCheckbox7 = false;
        clickedCheckbox8 = false;
        clickedCheckbox9 = false;
        clickedCheckbox10 = false;
        clickedCheckbox11 = false;
        clickedCheckbox12 = false;
        clickedCheckbox13 = false;
        counter = 0;
    }


    public boolean isVideo1()
    {
        return video1;
    }

    public void setVideo1(boolean video1)
    {
        this.video1 = video1;
    }

    public boolean isVideo2()
    {
        return video2;
    }

    public void setVideo2(boolean video2)
    {
        this.video2 = video2;
    }

    public boolean isVideo3()
    {
        return video3;
    }

    public void setVideo3(boolean video3)
    {
        this.video3 = video3;
    }

    public String getAnswer()
    {
        return answer;
    }

    public void setAnswer(String answer)
    {
        this.answer = answer;
    }

    public boolean isTextNextDisabled()
    {
        return text3;
    }

    public Integer getAnswerNumber()
    {
        return answerNumber;
    }

    public void setAnswerNumber(Integer answerNumber)
    {
        this.answerNumber = answerNumber;
    }

    public void showFirstAnswer(ActionEvent event)
    {
        answerNumber = 0;
        answer = "Yes, it's a Question 1";
    }

    public void showSecondAnswer(ActionEvent event)
    {
        answerNumber = 1;
        answer = "Yes, it's a Question number 2";
    }

    public void showThirdAnswer(ActionEvent event)
    {
        answerNumber = 2;
        answer = "Yes, it's your third Question";
    }


    public String switchVideoNext()
    {

        if (video1)
        {
            if (!clickedVideo2)
            {
                bonuses += 10;
                clickedVideo2 = true;
            }
            video1 = false;
            video2 = true;
            video3 = false;
        }
        else if (video2)
        {
            if (!clickedVideo3)
            {
                bonuses += 10;
                clickedVideo3 = true;
            }
            video1 = false;
            video2 = false;
            video3 = true;
        }
        else if (video3)
        {
            video1 = false;
            video2 = false;
            video3 = true;
        }
        return Constants.Navigation.VIDEO_AD_LINK;
    }

    public String switchVideoPrevious()
    {
        if (video3)
        {
            if (!clickedVideo2)
            {
                bonuses = bonuses + 10;
                clickedVideo2 = true;
            }
            video1 = false;
            video2 = true;
            video3 = false;
        }
        else if (video2)
        {
            if (!clickedVideo1)
            {
                bonuses = bonuses + 10;
                clickedVideo1 = true;
            }
            video1 = true;
            video2 = false;
            video3 = false;
        }
        else if (video1)
        {
            video1 = true;
            video2 = false;
            video3 = false;
        }

        return Constants.Navigation.VIDEO_AD_LINK;
    }

    public String refresh()
    {
        return null;
    }


    public String switchPictureNext()
    {
        if (picture1)
        {
            if (!clickedPicture2)
            {
                bonuses = bonuses + 10;
                clickedPicture2 = true;
            }
            picture1 = false;
            picture2 = true;
            picture3 = false;
        }
        else if (picture2)
        {
            if (!clickedPicture3)
            {
                bonuses = bonuses + 10;
                clickedPicture3 = true;
            }
            picture1 = false;
            picture2 = false;
            picture3 = true;
        }
        else if (picture3)
        {
            picture1 = false;
            picture2 = false;
            picture3 = true;
        }
        return Constants.Navigation.PICTURES_LINK;
    }

    public String switchPicturePrevious()
    {
        if (picture3)
        {
            if (!clickedPicture2)
            {
                bonuses = bonuses + 10;
                clickedPicture2 = true;
            }
            picture1 = false;
            picture2 = true;
            picture3 = false;
        }
        else if (picture2)
        {
            if (!clickedPicture1)
            {
                bonuses = bonuses + 10;
                clickedPicture1 = true;
            }
            picture1 = true;
            picture2 = false;
            picture3 = false;
        }
        else if (picture1)
        {
            picture1 = true;
            picture2 = false;
            picture3 = false;
        }
        return Constants.Navigation.PICTURES_LINK;
    }

    public String switchTextNext()
    {
        if (text1)
        {
            if (!clickedText2)
            {
                bonuses = bonuses + 10;
                clickedText2 = true;
            }
            text1 = false;
            text2 = true;
            text3 = false;
        }
        else if (text2)
        {
            if (!clickedText3)
            {
                bonuses = bonuses + 10;
                clickedText3 = true;
            }
            text1 = false;
            text2 = false;
            text3 = true;
        }
        else if (text3)
        {
            text1 = false;
            text2 = false;
            text3 = true;
        }
        return Constants.Navigation.TEXT_LINK;
    }

    public String switchTextPrevious()
    {
        if (text3)
        {
            if (!clickedText2)
            {
                bonuses += 10;
                clickedText2 = true;
            }
            text1 = false;
            text2 = true;
            text3 = false;
        }
        else if (text2)
        {
            if (!clickedText1)
            {
                bonuses += 10;
                clickedText1 = true;
            }
            text1 = true;
            text2 = false;
            text3 = false;
        }
        else if (text1)
        {
            text1 = true;
            text2 = false;
            text3 = false;
        }
        return Constants.Navigation.TEXT_LINK;
    }

    public boolean isText1()
    {
        return text1;
    }

    public void setText1(boolean text1)
    {
        this.text1 = text1;
    }

    public boolean isText2()
    {
        return text2;
    }

    public void setText2(boolean text2)
    {
        this.text2 = text2;
    }

    public boolean isText3()
    {
        return text3;
    }

    public void setText3(boolean text3)
    {
        this.text3 = text3;
    }

    public boolean isPicture1()
    {
        return picture1;
    }

    public void setPicture1(boolean picture1)
    {
        this.picture1 = picture1;
    }

    public boolean isPicture2()
    {
        return picture2;
    }

    public void setPicture2(boolean picture2)
    {
        this.picture2 = picture2;
    }

    public boolean isPicture3()
    {
        return picture3;
    }

    public void setPicture3(boolean picture3)
    {
        this.picture3 = picture3;
    }

    public Integer getBonuses()
    {
        return bonuses;
    }

    public void setBonuses(Integer bonuses)
    {
        this.bonuses = bonuses;
    }

    public Integer getAdsViewed()
    {
        return adsViewed;
    }

    public void setAdsViewed(Integer adsViewed)
    {
        this.adsViewed = adsViewed;
    }

    public String getPhoneNumber()
    {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber)
    {
        this.phoneNumber = phoneNumber;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getRepeatPassword()
    {
        return repeatPassword;
    }

    public void setRepeatPassword(String repeatPassword)
    {
        this.repeatPassword = repeatPassword;
    }

    //-----------------------------------------------------------------------------------------------------------
    public String menu()
    {
        previousStep = Constants.Navigation.LOGIN_LINK;
        currentStep = Constants.Navigation.MENU_LINK;
        return currentStep;
    }

    public String registration()
    {
        ages = new ArrayList<SelectItem>();
        ages.add(new SelectItem(AGE1));
        ages.add(new SelectItem(AGE2));
        ages.add(new SelectItem(AGE3));
        ages.add(new SelectItem(AGE4));
        ages.add(new SelectItem(AGE5));
        ages.add(new SelectItem(AGE6));
        return Constants.Navigation.REGISTRATION_LINK;
    }

    public String adViewing()
    {
        adsViewed++;
        previousStep = Constants.Navigation.AD_VIEWING_LINK;
        currentStep = Constants.Navigation.AD_VIEWING_LINK;
        return Constants.Navigation.AD_VIEWING_LINK;
    }

    public String chooseCategoryFull()
    {
        return Constants.Navigation.CHOOSE_CATEGORY_FULL_LINK;
    }


    public String adOnMap()
    {
        adsViewed++;
        return Constants.Navigation.AD_ON_MAP_LINK;
    }

    public String bonusesExchanged()
    {
        previousStep = currentStep;
        currentStep = Constants.Navigation.BONUSES_EXCHANGED_LINK;
        return Constants.Navigation.BONUSES_EXCHANGED_LINK;
    }

    public String redeemBonusInternet()
    {
        currentStep = Constants.Navigation.REDEEM_BONUS_INTERNET_LINK;
        return Constants.Navigation.REDEEM_BONUS_INTERNET_LINK;
    }

    public String redeemBonusTalk()
    {
        currentStep = Constants.Navigation.REDEEM_BONUS_TALK_LINK;
        return Constants.Navigation.REDEEM_BONUS_TALK_LINK;
    }

    public String redeemBonusSms()
    {
        currentStep = Constants.Navigation.REDEEM_BONUS_SMS_LINK;
        return Constants.Navigation.REDEEM_BONUS_SMS_LINK;
    }

    public String chooseUserProfile()
    {
        return Constants.Navigation.CHOOSE_USER_PROFILE_LINK;
    }

    public String redeemBonus()
    {
        currentStep = Constants.Navigation.REDEEM_BONUS_LINK;
        return Constants.Navigation.REDEEM_BONUS_LINK;
    }

    public String videoAd()
    {
        if (!clickedVideo1)
        {
            bonuses = bonuses + 10;
            clickedVideo1 = true;
        }
        return Constants.Navigation.VIDEO_AD_LINK;
    }

    public String pictures()
    {
        if (!clickedPicture1)
        {
            bonuses += 10;
            clickedPicture1 = true;
        }
        adsViewed++;
        return Constants.Navigation.PICTURES_LINK;
    }

    public String text()
    {
        if (!clickedText1)
        {
            bonuses += 10;
            clickedText1 = true;
        }
        adsViewed++;
        return Constants.Navigation.TEXT_LINK;
    }



    public String feedback()
    {
        return Constants.Navigation.FEEDBACK_LINK;
    }

    public String male1518Low()
    {
        firstVideoContent = "http://www.youtube.com/v/O23meB6AoPc?rel&amp";
        secondVideoContent = "http://www.youtube.com/v/MCG7XOluBjw?rel=0&amp";
        thirdVideoContent = "http://www.youtube.com/v/WgOR1Xwxvyw?rel=0&amp";

        firstVideoLabel = "Coca Cola Ad India ";
        firstVideoDescription = "Coca Cola Ad India ";
        secondVideoLabel = "Trek Bicycle \"Best\" TV Commercial ";
        secondVideoDescription = "After 30-plus successful years, you tend to reflect on what got you here. \"Best,\" looks at our legacy from a pro's perspective.";
        thirdVideoLabel = "Nike Cricket: Yards. Just Do It.";
        thirdVideoDescription = "Cricket Is beyond sport. It is life itself, in every gully and in every home.\n" + "Street or stadium, 22 yards is where today's legends are made and tomorrow's heroes are born.";

        firstGraphicContent = "http://www.funcoolavatars.com/avatars/Logos/Gaming/Gamecube-logo-animated.gif";
        secondGraphicContent = "i/src/amano_manish.jpg";
        thirdGraphicContent = "i/src/summer_camp_small.jpg";

        firstGraphicLabel = "";
        firstGraphicDescription = "\n Gamecube - India, Video Games - Consoles - India, For Sale.";
        secondGraphicLabel = "";
        secondGraphicDescription = "\n The Delhi Guitar School is the India's leading and most imitated school of contemporary Guitar Playing. ";
        thirdGraphicLabel = "";
        thirdGraphicDescription = "\n Summer camp Holidays full of Fun and adventure enjoy activities- building Bamboo rafts, playing in natural stream, Bird box making.";

        firstGraphicLink = "www.olx.in";
        secondGraphicLink = "www.delhiguitarschool.com/music-courses-cert.html";
        thirdGraphicLink = "www.kidssummercamp.in";

        firstTextContentPart1 = "Subway Restaurants India.\n" + "\n" + "Eat fresh sandwiches and salads at Subway, India's favourite restuarant. ";
        secondTextContentPart1 = " Mobile in India. \n" + "\n" + "Search for Latest Mobile, Price of Mobile, Compare with other mobiles, price, mobile features and other useful thing about Mobile";
        thirdTextContentPart1 = "Fitness Equipments India.\n" + "\n" + "Acme is a leading provider of fitness equipments of reputed brands. Spread across India, Acme supplies leading fitness products including Treadmills.";

        firstTextLink = "www.subway.co.in";
        secondTextLink = "mobileinindia.in";
        thirdTextLink = "www.acmefitness.com";

        firstTextContentPart2 = "Subway Restaurants India.\n" + "\n" + "Eat fresh sandwiches and salads at Subway, India's favourite restuarant. ";
        secondTextContentPart2 = " Mobile in India. \n" + "\n" + "Search for Latest Mobile, Price of Mobile, Compare with other mobiles, price, mobile features and other useful thing about Mobile";
        thirdTextContentPart2 = "Fitness Equipments India.\n" + "\n" + "Acme is a leading provider of fitness equipments of reputed brands. Spread across India, Acme supplies leading fitness products including Treadmills.";
        return menu();
    }

    public String male1921Low()
    {
        firstVideoContent = "http://www.youtube.com/v/hds_qO9Bkwo?rel=0&amp";
        secondVideoContent = "http://www.youtube.com/v/jmNrvlQ73pU?rel=0&amp";
        thirdVideoContent = "http://www.youtube.com/v/SpHbBzUEOPI?rel=0&amp";

        firstVideoLabel = "TATA NANO commercial";
        firstVideoDescription = "A commercial made for a competition that won 1st prize";
        secondVideoLabel = "McDonalds BF&GF - India ad[HD] ";
        secondVideoDescription = "McDonalds ad in India: One of the best McDonald's ads\n" + "All i can say is : I am Lovin'it";
        thirdVideoLabel = "India's best University ad ";
        thirdVideoDescription = "One of the best ads created for an academic institution. Kudos to the director Kabeer Kaushik.";

        firstGraphicContent = "http://www.funcoolavatars.com/avatars/Transport/Harley-Davidson-logo-animated.gif";
        secondGraphicContent = "i/src/smallPCSlogo.jpg";
        thirdGraphicContent = "i/src/indenairlines.jpg";

        firstGraphicLabel = "";
        firstGraphicDescription = "\n" + "Welcome to the official home of Harley-Davidson India. Check out the new Harley-Davidson 2011 India line-up.";
        secondGraphicLabel = "";
        secondGraphicDescription = "\n" + "Study for Top Management and Technical courses via Distance Education or Campus at PCS India.";
        thirdGraphicLabel = "";
        thirdGraphicDescription = " \n" + "Mumbai has the most-active nightlife of the country. Check out the nightclubs/ night clubs of Bombay, India.";

        firstTextContentPart1 = "Learn English in New Delhi, India or Learn French in New Delhi, India. \n" + "\n" + " Study and Learn English or French at International Language Schools of Canada in New Delhi, India. Homestay TOEFL, TOEIC, Reading, Speaking.";
        secondTextContentPart1 = "Travel Agency in India.\n" + "\n" + "With 10yrs of Exp. Ask for Tour\n" + "Price before Booking. Compare!";
        thirdTextContentPart1 = "Cycles in India | Buy Bicycles Online | Cycling Accessories.\n" + "\n" + "BSA Hercules one of the leading bicycle manufacturers in India produces wide range of cycling products & accessories.";

        firstTextLink = "www.ilsc.in";
        secondTextLink = "www.indiantourismexpert.com";
        thirdTextLink = "https://www.bsahercules.com";

        firstTextContentPart2 = "Subway Restaurants India.\n" + "\n" + "Eat fresh sandwiches and salads at Subway, India's favourite restuarant. ";
        secondTextContentPart2 = " Mobile in India. \n" + "\n" + "Search for Latest Mobile, Price of Mobile, Compare with other mobiles, price, mobile features and other useful thing about Mobile";
        thirdTextContentPart2 = "Fitness Equipments India.\n" + "\n" + "Acme is a leading provider of fitness equipments of reputed brands. Spread across India, Acme supplies leading fitness products including Treadmills.";

        firstGraphicLink = "www.harley-davidson.in";
        secondGraphicLink = "www.pcsindia.in";
        thirdGraphicLink = "www.mumbai.org.uk/nightlife-in-mumbai.html";

        return menu();
    }

    public String female2835Hi()
    {
        firstVideoContent = "http://www.youtube.com/v/wUz2NT2AeTg?rel=0&amp";
        secondVideoContent = "http://www.youtube.com/v/9kjZ_8hMPhM?rel=0&amp";
        thirdVideoContent = "http://www.youtube.com/v/bO9gg_g2oRg?rel=0&amp";

        firstVideoLabel = "Hair Oil (Shobana)ad";
        firstVideoDescription = "Mediker Anti Lice Hair Oil (Shobana) - HQ TV Commercial ad";
        secondVideoLabel = "South Indian Bank Ad";
        secondVideoDescription = "South Indian Bank Ad, South Indian Bank Commercial, Film Ad with Megastar Mammootty, Brand Ambassidor or South Indian Bank";
        thirdVideoLabel = "Idea Cellular - Indian Mobile Network Company";
        thirdVideoDescription = "An ad from Idea Cellular showcasing the launch of their exclusive SIM card, especially meant for women.";

        firstGraphicContent = "i/src/diamond-jewelry.jpg";
        secondGraphicContent = "i/src/fitness.gif";
        thirdGraphicContent = "i/src/india.gif";

        firstGraphicLabel = "";
        firstGraphicDescription = "\n" + "Indian Jewelry and latest designs of Fashion.";
        secondGraphicLabel = "";
        secondGraphicDescription = "\n" + "Supplies and distributes health, fitness, exercise and medical equipment.";
        thirdGraphicLabel = "";
        thirdGraphicDescription = "\n" + "21 Jun 2011 – India travel, tours, trips, India flights, and India hotels.";

        firstTextContentPart1 = "\n" + "21 Jun 2011 – India travel, tours, trips, India flights, and India hotels.";
        secondTextContentPart1 = "Office Space India.\n" + "\n" + "Office Space in India – Incube, the name behind the most sought after business centre inIndia offers ready to move in office space in Bangalore.";
        thirdTextContentPart1 = "ANS Jewelry India | Indian Jewelry Online. \n" + "\n" + "ANS Jewelry India is a traditional and trusted name in online jewelry - a name that spells uncompromising quality and service.";

        firstTextLink= "www.travelingindia.net";
        secondTextLink = "www.incube.in";
        thirdTextLink = "www.ansjewelry.com";

        firstTextContentPart2 = "Subway Restaurants India.\n" + "\n" + "Eat fresh sandwiches and salads at Subway, India's favourite restuarant. ";
        secondTextContentPart2 = " Mobile in India. \n" + "\n" + "Search for Latest Mobile, Price of Mobile, Compare with other mobiles, price, mobile features and other useful thing about Mobile";
        thirdTextContentPart2 = "Fitness Equipments India.\n" + "\n" + "Acme is a leading provider of fitness equipments of reputed brands. Spread across India, Acme supplies leading fitness products including Treadmills.";

        firstGraphicLink = "www.bombayfashions.com";
        secondGraphicLink = "www.cardiomedindia.com";
        thirdGraphicLink = "www.travelingindia.net";
        return menu();
    }

    public String male3645Max()
    {
        firstVideoContent = "http://www.youtube.com/v/SpZJScbxDPA?rel=0&amp";
        secondVideoContent = "http://www.youtube.com/v/DMloQr679vw?rel=0&amp";
        thirdVideoContent = "http://www.youtube.com/v/Vbl0GbQ1tKY?rel=0&amp";

        firstVideoLabel = "Samsung Galaxy S II Commercial 3";
        firstVideoDescription = "Samsung i9100 Galaxy S II Unlocked GSM Smartphone with 8 MP Camera, Android OS, 16GB Internal Memory, Touchscreen, Wi-Fi, GPS - Black";
        secondVideoLabel = "MERCEDES BENZ COMMERCIAL FUNNY";
        secondVideoDescription = "No description";
        thirdVideoLabel = "Air India ";
        thirdVideoDescription = "Commercial for Air India";

        firstGraphicContent = "i/src/swatch-logo.jpg";
        secondGraphicContent = "i/src/air india.jpg";
        thirdGraphicContent = "http://www.se4ever.ru/uploads/posts/2008-05/1209886857_walkss.gif";

        firstGraphicLabel = "";
        firstGraphicDescription = "\n" + "Official Swatch site: browse the latest Swatch collections of Swatch Originals, Irony, Skin, Flik Flak, and Swatch Bijoux (jewellery). Buy watches online in our shop.";
        secondGraphicLabel = "";
        secondGraphicDescription = "\n" + "WELCOME TO AIR INDIA WEBSITE. ";
        thirdGraphicLabel = "";
        thirdGraphicDescription = "\n" + "Welcome to Sony Ericsson! You'll find product and support information for our mobile phones and accessories.";

        firstTextContentPart1 = "BMW India. \n" + "\n" + "Explore the wide choice of fascinating BMW automobiles.";
        secondTextContentPart1 = "Indian Airlines Tickets - Get the cheapest flights Deals.\n" + "     \n" + "Find & Compare Prices on Flights.";
        thirdTextContentPart1 = "Luxury Swiss Watches. \n" + "\n" + "Top Brands Summer Sales by Klepsoo.\n" + "Up to -80% Best Deals of the Year!";

        firstTextLink = "www.bmw.in";
        secondTextLink = "indian-airlines.tripbase.com/Deals";
        thirdTextLink = "www.klepsoo.com";

        firstTextContentPart2 = "Subway Restaurants India.\n" + "\n" + "Eat fresh sandwiches and salads at Subway, India's favourite restuarant. ";
        secondTextContentPart2 = " Mobile in India. \n" + "\n" + "Search for Latest Mobile, Price of Mobile, Compare with other mobiles, price, mobile features and other useful thing about Mobile";
        thirdTextContentPart2 = "Fitness Equipments India.\n" + "\n" + "Acme is a leading provider of fitness equipments of reputed brands. Spread across India, Acme supplies leading fitness products including Treadmills.";

        firstGraphicLink = "www.swatch.com";
        secondGraphicLink = "www.airindia.co.in";
        thirdGraphicLink = "www.sonyericsson.com";


        return menu();
    }

    public String statistics()
    {
        return Constants.Navigation.STATISTICS_LINK;
    }

    public String settings()
    {
        previousStep = Constants.Navigation.MENU_LINK;
        currentStep = Constants.Navigation.SETTINGS_LINK;
        return currentStep;
    }

    public String information()
    {
        previousStep = currentStep;
        currentStep = Constants.Navigation.INFORMATION_LINK;
        return Constants.Navigation.INFORMATION_LINK;
    }

    public String backFromInformation()
    {
        currentStep = previousStep;
        previousStep = Constants.Navigation.INFORMATION_LINK;
        return currentStep;
    }

    public String backFromBonusesExchanged()
    {
        currentStep = previousStep;
        previousStep = Constants.Navigation.BONUSES_EXCHANGED_LINK;
        return currentStep;
    }

    public String language()
    {
        previousStep = currentStep;
        currentStep = Constants.Navigation.LANGUAGE_LINK;
        return Constants.Navigation.LANGUAGE_LINK;
    }

    public String backFromLanguage()
    {
        currentStep = previousStep;
        previousStep = Constants.Navigation.LANGUAGE_LINK;
        return currentStep;
    }

    public String openMark()
    {
        if (!clickedAdOnMap)
        {
            bonuses = bonuses + 10;
            clickedAdOnMap = true;
        }
        return Constants.Navigation.OPENED_MARK_LINK;
    }

    public String closeMark()
    {
        return Constants.Navigation.AD_ON_MAP_LINK;
    }

    public String toLogin()
    {
        previousStep = Constants.Navigation.LOGIN_LINK;
        currentStep = Constants.Navigation.LOGIN_LINK;
        return Constants.Navigation.LOGIN_LINK;
    }

    public String audio()
    {
        return null;
    }

    public String feedbackAnswers()
    {
        return Constants.Navigation.FEEDBACK_ANSWERS_LINK;
    }



    public String getCurrentStep()
    {
        return currentStep;
    }

    public void setCurrentStep(String currentStep)
    {
        this.currentStep = currentStep;
    }

    public String getPreviousStep()
    {
        return previousStep;
    }

    public void setPreviousStep(String previousStep)
    {
        this.previousStep = previousStep;
    }

    public boolean isCategoriesNotChosen()
    {
       return !clickedCheckbox1 && !clickedCheckbox2 && !clickedCheckbox3 && !clickedCheckbox4
                &&!clickedCheckbox5 && !clickedCheckbox6 && !clickedCheckbox7  && !clickedCheckbox8 &&
                !clickedCheckbox9 && !clickedCheckbox10 && !clickedCheckbox11 && !clickedCheckbox12
                && !clickedCheckbox13;
    }

    public String chooseCategories()
    {
        return Constants.Navigation.CHOOSE_CATEGORIES_LINK;
    }

    public String registerNewPerson()
    {
        Person person = new Person(phoneNumber, password, currentAge, getSex());
        PersonDAO personDAO = FactoryDAO.getFactory().getPersonDao();
        personDAO.save(person);
        return Constants.Navigation.CHOOSE_USER_PROFILE_LINK;
    }


    public String getSex()
    {
        if (maleSwitcher)
        {
            return MALE;
        }
        return FEMALE;
    }

    public void switchToMale()
    {
        maleSwitcher = true;
        male = MALE_ON_URL;
        female = FEMALE_OFF_URL;
    }

    public void switchToFemale()
    {
        maleSwitcher = false;
        male = MALE_OFF_URL;
        female = FEMALE_ON_URL;
    }

    public String getMale()
    {
        return male;
    }

    public void setMale(String male)
    {
        this.male = male;
    }

    public String getFemale()
    {
        return female;
    }

    public void setFemale(String female)
    {
        this.female = female;
    }


    public String getCurrentAge()
    {
        return currentAge;
    }

    public void setCurrentAge(String currentAge)
    {
        this.currentAge = currentAge;
    }

    public List<SelectItem> getAges()
    {
        return ages;
    }

    public void setAges(List<SelectItem> ages)
    {
        this.ages = ages;
    }


    public boolean isMaleSwitcher()
    {
        return maleSwitcher;
    }

    public void setMaleSwitcher(boolean maleSwitcher)
    {
        this.maleSwitcher = maleSwitcher;
    }

    public boolean isClickedVideo1()
    {
        return clickedVideo1;
    }

    public void setClickedVideo1(boolean clickedVideo1)
    {
        this.clickedVideo1 = clickedVideo1;
    }

    public boolean isClickedVideo2()
    {
        return clickedVideo2;
    }

    public void setClickedVideo2(boolean clickedVideo2)
    {
        this.clickedVideo2 = clickedVideo2;
    }

    public boolean isClickedVideo3()
    {
        return clickedVideo3;
    }

    public void setClickedVideo3(boolean clickedVideo3)
    {
        this.clickedVideo3 = clickedVideo3;
    }

    public boolean isClickedPicture1()
    {
        return clickedPicture1;
    }

    public void setClickedPicture1(boolean clickedPicture1)
    {
        this.clickedPicture1 = clickedPicture1;
    }

    public boolean isClickedPicture2()
    {
        return clickedPicture2;
    }

    public void setClickedPicture2(boolean clickedPicture2)
    {
        this.clickedPicture2 = clickedPicture2;
    }

    public boolean isClickedPicture3()
    {
        return clickedPicture3;
    }

    public void setClickedPicture3(boolean clickedPicture3)
    {
        this.clickedPicture3 = clickedPicture3;
    }

    public boolean isClickedText1()
    {
        return clickedText1;
    }

    public void setClickedText1(boolean clickedText1)
    {
        this.clickedText1 = clickedText1;
    }

    public boolean isClickedText2()
    {
        return clickedText2;
    }

    public void setClickedText2(boolean clickedText2)
    {
        this.clickedText2 = clickedText2;
    }

    public boolean isClickedText3()
    {
        return clickedText3;
    }

    public void setClickedText3(boolean clickedText3)
    {
        this.clickedText3 = clickedText3;
    }

    public boolean isClickedAdOnMap()
    {
        return clickedAdOnMap;
    }

    public void setClickedAdOnMap(boolean clickedAdOnMap)
    {
        this.clickedAdOnMap = clickedAdOnMap;
    }

    public boolean isClickedCheckbox1()
    {
        return clickedCheckbox1;
    }

    public void setClickedCheckbox1(boolean clickedCheckbox1)
    {
        this.clickedCheckbox1 = clickedCheckbox1;
    }

    public void removeCheckBox1(ActionEvent actionEvent)
    {
        clickedCheckbox1 = false;
    }

    public boolean isClickedCheckbox2()
    {
        return clickedCheckbox2;
    }

    public void setClickedCheckbox2(boolean clickedCheckbox2)
    {
        this.clickedCheckbox2 = clickedCheckbox2;
    }

    public void removeCheckBox2(ActionEvent actionEvent)
    {
        clickedCheckbox2 = false;
    }

    public boolean isClickedCheckbox3()
    {
        return clickedCheckbox3;
    }

    public void setClickedCheckbox3(boolean clickedCheckbox3)
    {
        this.clickedCheckbox3 = clickedCheckbox3;
    }

    public void removeCheckBox3(ActionEvent actionEvent)
    {
        clickedCheckbox3 = false;
    }

    public boolean isClickedCheckbox4()
    {
        return clickedCheckbox4;
    }

    public void setClickedCheckbox4(boolean clickedCheckbox4)
    {
        this.clickedCheckbox4 = clickedCheckbox4;
    }

    public boolean isClickedCheckbox5()
    {
        return clickedCheckbox5;
    }

    public void setClickedCheckbox5(boolean clickedCheckbox5)
    {
        this.clickedCheckbox5 = clickedCheckbox5;
    }

    public boolean isClickedCheckbox6()
    {
        return clickedCheckbox6;
    }

    public void setClickedCheckbox6(boolean clickedCheckbox6)
    {
        this.clickedCheckbox6 = clickedCheckbox6;
    }

    public boolean isClickedCheckbox7()
    {
        return clickedCheckbox7;
    }

    public void setClickedCheckbox7(boolean clickedCheckbox7)
    {
        this.clickedCheckbox7 = clickedCheckbox7;
    }

    public boolean isClickedCheckbox8()
    {
        return clickedCheckbox8;
    }

    public void setClickedCheckbox8(boolean clickedCheckbox8)
    {
        this.clickedCheckbox8 = clickedCheckbox8;
    }

    public boolean isClickedCheckbox9()
    {
        return clickedCheckbox9;
    }

    public void setClickedCheckbox9(boolean clickedCheckbox9)
    {
        this.clickedCheckbox9 = clickedCheckbox9;
    }

    public boolean isClickedCheckbox10()
    {
        return clickedCheckbox10;
    }

    public void setClickedCheckbox10(boolean clickedCheckbox10)
    {
        this.clickedCheckbox10 = clickedCheckbox10;
    }

    public boolean isClickedCheckbox11()
    {
        return clickedCheckbox11;
    }

    public void setClickedCheckbox11(boolean clickedCheckbox11)
    {
        this.clickedCheckbox11 = clickedCheckbox11;
    }

    public boolean isClickedCheckbox12()
    {
        return clickedCheckbox12;
    }

    public void setClickedCheckbox12(boolean clickedCheckbox12)
    {
        this.clickedCheckbox12 = clickedCheckbox12;
    }

    public boolean isClickedCheckbox13()
    {
        return clickedCheckbox13;
    }

    public void setClickedCheckbox13(boolean clickedCheckbox13)
    {
        this.clickedCheckbox13 = clickedCheckbox13;
    }

    public void chooseCategory1(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.AUTO;
        showLastChosenCategory();
    }

    public void chooseCategory2(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.RESTAURANTS;
        showLastChosenCategory();
    }

    public void chooseCategory3(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.LUXURY;
        showLastChosenCategory();
    }

    public void chooseCategory4(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.SPORT_FITNESS;
        showLastChosenCategory();
    }

    public void chooseCategory5(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.LOANS_FINANCE;
        showLastChosenCategory();
    }

    public void chooseCategory6(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.REALTY;
        showLastChosenCategory();
    }

    public void chooseCategory7(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.NOTARY_LEGAL_SERVICES;
        showLastChosenCategory();
    }

    public void chooseCategory8(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.JEWELRY;
        showLastChosenCategory();
    }

    public void chooseCategory9(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.ACCESSORIES;
        showLastChosenCategory();
    }

    public void chooseCategory10(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.HOTELS_RESORTS;
        showLastChosenCategory();
    }

    public void chooseCategory11(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.HEALTH_CARE;
        showLastChosenCategory();
    }

    public void chooseCategory12(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.MEDICAL_SERVICES;
        showLastChosenCategory();
    }

    public void chooseCategory13(ValueChangeEvent event) throws Exception
    {
           lastChosenCategory = LastChosenCategory.HIGH_TECH;
        showLastChosenCategory();
    }

    private void showLastChosenCategory()
    {
    }

    public void removeCheckBox4(ActionEvent actionEvent)
    {
        clickedCheckbox4 = false;
    }

    public void removeCheckBox5(ActionEvent actionEvent)
    {
        clickedCheckbox5 = false;
    }

    public void removeCheckBox6(ActionEvent actionEvent)
    {
        clickedCheckbox6 = false;
    }

    public void removeCheckBox7(ActionEvent actionEvent)
    {
        clickedCheckbox7 = false;
    }

    public void removeCheckBox8(ActionEvent actionEvent)
    {
        clickedCheckbox8 = false;
    }

    public void removeCheckBox9(ActionEvent actionEvent)
    {
        clickedCheckbox9 = false;
    }

  public void removeCheckBox10(ActionEvent actionEvent)
    {
        clickedCheckbox10 = false;
    }

  public void removeCheckBox11(ActionEvent actionEvent)
    {
        clickedCheckbox11 = false;
    }

 public void removeCheckBox12(ActionEvent actionEvent)
    {
        clickedCheckbox12 = false;
    }

public void removeCheckBox13(ActionEvent actionEvent)
    {
        clickedCheckbox13 = false;
    }


    public void uncheckLastCheckbox(ActionEvent actionEvent)
    {
        if (lastChosenCategory == LastChosenCategory.AUTO)
        {
            clickedCheckbox1 = false;
        }
        else if (lastChosenCategory == LastChosenCategory.RESTAURANTS)
        {
            clickedCheckbox2 = false;
        }
        else if (lastChosenCategory == LastChosenCategory.LUXURY)
        {
            clickedCheckbox3 = false;
        }
        else if (lastChosenCategory == LastChosenCategory.SPORT_FITNESS)
        {
            clickedCheckbox4 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.LOANS_FINANCE)
        {
            clickedCheckbox5 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.REALTY)
        {
            clickedCheckbox6 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.NOTARY_LEGAL_SERVICES)
        {
            clickedCheckbox7 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.JEWELRY)
        {
            clickedCheckbox8 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.ACCESSORIES)
        {
            clickedCheckbox9 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.HOTELS_RESORTS)
        {
            clickedCheckbox10 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.HEALTH_CARE)
        {
            clickedCheckbox11 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.MEDICAL_SERVICES)
        {
            clickedCheckbox12 = false;
        }
      else if (lastChosenCategory == LastChosenCategory.HIGH_TECH)
        {
            clickedCheckbox13 = false;
        }
    }

    public String getFirstVideoContent()
    {
        return firstVideoContent;
    }

    public void setFirstVideoContent(String firstVideoContent)
    {
        this.firstVideoContent = firstVideoContent;
    }

    public String getSecondVideoContent()
    {
        return secondVideoContent;
    }

    public void setSecondVideoContent(String secondVideoContent)
    {
        this.secondVideoContent = secondVideoContent;
    }

    public String getThirdVideoContent()
    {
        return thirdVideoContent;
    }

    public void setThirdVideoContent(String thirdVideoContent)
    {
        this.thirdVideoContent = thirdVideoContent;
    }

    public String getFirstGraphicContent()
    {
        return firstGraphicContent;
    }

    public void setFirstGraphicContent(String firstGraphicContent)
    {
        this.firstGraphicContent = firstGraphicContent;
    }

    public String getSecondGraphicContent()
    {
        return secondGraphicContent;
    }

    public void setSecondGraphicContent(String secondGraphicContent)
    {
        this.secondGraphicContent = secondGraphicContent;
    }

    public String getThirdGraphicContent()
    {
        return thirdGraphicContent;
    }

    public void setThirdGraphicContent(String thirdGraphicContent)
    {
        this.thirdGraphicContent = thirdGraphicContent;
    }

    public String getFirstTextContentPart1()
    {
        return firstTextContentPart1;
    }

    public void setFirstTextContentPart1(String firstTextContentPart1)
    {
        this.firstTextContentPart1 = firstTextContentPart1;
    }

    public String getSecondTextContentPart1()
    {
        return secondTextContentPart1;
    }

    public void setSecondTextContentPart1(String secondTextContentPart1)
    {
        this.secondTextContentPart1 = secondTextContentPart1;
    }

    public String getThirdTextContentPart1()
    {
        return thirdTextContentPart1;
    }

    public void setThirdTextContentPart1(String thirdTextContentPart1)
    {
        this.thirdTextContentPart1 = thirdTextContentPart1;
    }

    public String getFirstVideoLabel()
    {
        return firstVideoLabel;
    }

    public void setFirstVideoLabel(String firstVideoLabel)
    {
        this.firstVideoLabel = firstVideoLabel;
    }

    public String getSecondVideoLabel()
    {
        return secondVideoLabel;
    }

    public void setSecondVideoLabel(String secondVideoLabel)
    {
        this.secondVideoLabel = secondVideoLabel;
    }

    public String getThirdVideoLabel()
    {
        return thirdVideoLabel;
    }

    public void setThirdVideoLabel(String thirdVideoLabel)
    {
        this.thirdVideoLabel = thirdVideoLabel;
    }

    public String getFirstVideoDescription()
    {
        return firstVideoDescription;
    }

    public void setFirstVideoDescription(String firstVideoDescription)
    {
        this.firstVideoDescription = firstVideoDescription;
    }

    public String getSecondVideoDescription()
    {
        return secondVideoDescription;
    }

    public void setSecondVideoDescription(String secondVideoDescription)
    {
        this.secondVideoDescription = secondVideoDescription;
    }

    public String getThirdVideoDescription()
    {
        return thirdVideoDescription;
    }

    public void setThirdVideoDescription(String thirdVideoDescription)
    {
        this.thirdVideoDescription = thirdVideoDescription;
    }

    public String getFirstGraphicLabel()
    {
        return firstGraphicLabel;
    }

    public void setFirstGraphicLabel(String firstGraphicLabel)
    {
        this.firstGraphicLabel = firstGraphicLabel;
    }

    public String getSecondGraphicLabel()
    {
        return secondGraphicLabel;
    }

    public void setSecondGraphicLabel(String secondGraphicLabel)
    {
        this.secondGraphicLabel = secondGraphicLabel;
    }

    public String getThirdGraphicLabel()
    {
        return thirdGraphicLabel;
    }

    public void setThirdGraphicLabel(String thirdGraphicLabel)
    {
        this.thirdGraphicLabel = thirdGraphicLabel;
    }

    public String getFirstGraphicDescription()
    {
        return firstGraphicDescription;
    }

    public void setFirstGraphicDescription(String firstGraphicDescription)
    {
        this.firstGraphicDescription = firstGraphicDescription;
    }

    public String getSecondGraphicDescription()
    {
        return secondGraphicDescription;
    }

    public void setSecondGraphicDescription(String secondGraphicDescription)
    {
        this.secondGraphicDescription = secondGraphicDescription;
    }

    public String getThirdGraphicDescription()
    {
        return thirdGraphicDescription;
    }

    public void setThirdGraphicDescription(String thirdGraphicDescription)
    {
        this.thirdGraphicDescription = thirdGraphicDescription;
    }

    public LastChosenCategory getLastChosenCategory()
    {
        return lastChosenCategory;
    }

    public void setLastChosenCategory(LastChosenCategory lastChosenCategory)
    {
        this.lastChosenCategory = lastChosenCategory;
    }

    public String getFirstGraphicLink()
    {
        return firstGraphicLink;
    }

    public void setFirstGraphicLink(String firstGraphicLink)
    {
        this.firstGraphicLink = firstGraphicLink;
    }

    public String getSecondGraphicLink()
    {
        return secondGraphicLink;
    }

    public void setSecondGraphicLink(String secondGraphicLink)
    {
        this.secondGraphicLink = secondGraphicLink;
    }

    public String getThirdGraphicLink()
    {
        return thirdGraphicLink;
    }

    public void setThirdGraphicLink(String thirdGraphicLink)
    {
        this.thirdGraphicLink = thirdGraphicLink;
    }

    public String getFirstTextLink()
    {
        return firstTextLink;
    }

    public void setFirstTextLink(String firstTextLink)
    {
        this.firstTextLink = firstTextLink;
    }

    public String getSecondTextLink()
    {
        return secondTextLink;
    }

    public void setSecondTextLink(String secondTextLink)
    {
        this.secondTextLink = secondTextLink;
    }

    public String getThirdTextLink()
    {
        return thirdTextLink;
    }

    public void setThirdTextLink(String thirdTextLink)
    {
        this.thirdTextLink = thirdTextLink;
    }

    public String getFirstTextContentPart2()
    {
        return firstTextContentPart2;
    }

    public void setFirstTextContentPart2(String firstTextContentPart2)
    {
        this.firstTextContentPart2 = firstTextContentPart2;
    }

    public String getSecondTextContentPart2()
    {
        return secondTextContentPart2;
    }

    public void setSecondTextContentPart2(String secondTextContentPart2)
    {
        this.secondTextContentPart2 = secondTextContentPart2;
    }

    public String getThirdTextContentPart2()
    {
        return thirdTextContentPart2;
    }

    public void setThirdTextContentPart2(String thirdTextContentPart2)
    {
        this.thirdTextContentPart2 = thirdTextContentPart2;
    }
}
